package top.jianx.storage.factory;

import top.jianx.storage.template.StorageTemplate;

import java.util.Map;

/**
 * 〈StorageTemplateFactory〉
 *
 * @author Jianx
 * @create 2022/3/20
 * @since 1.0.0
 */
public class StorageTemplateFactory {

    /**
     * Map中的Value是 StorageTemplate
     */
    private Map<String, StorageTemplate> templateMap;

    /**
     * 返回对应的 StorageTemplate
     *
     * @param name oss类型
     * @return StorageTemplate
     */
    public StorageTemplate getInstance(String name) {
        return templateMap.get(name);
    }

    public void setTemplateMap(Map<String, StorageTemplate> serviceMap) {
        this.templateMap = serviceMap;
    }

}
